import simpleMap from './simpleMap'
import popup from './vueCompontent/popup.vue'
import { PlatformDataSource } from './Source/Platform/index'
import { ElementDataSource } from './Elements/index'
import { MeasureDataSource } from './Other/Measure'
import { _BasicDataSource } from './_BasicDataSource'
import { BaseEntity } from './Source/Entitys/BaseEntity'
import * as ViewerCache from './ViewerCache'
import Events from './Events'
import * as util from './util'
import * as Config from './Config'
import { QueryTask } from './QueryTask'

// import './CesiumGeometry';
import './plug-in/init'
import './plug-in/CesiumHeatmap'

// 将 Cesium 相机默认定位设置为中国地区
Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees(80, 22, 130, 50);//home定位到中国范围
Cesium.Ion.defaultAccessToken = false;
/**
 * 创建地图方法
 *
 * @param {HtmlDocument} html 需要初始化为地图的参数
 * @param {Object} options 地图配置参数
 * @return {simpleMap} 地图实例化对象
 */




var _util = {
    ...util,
    ...Config,
}

const initMap = function (html, options) {
    return new simpleMap(html, options);
};

export default {
    initMap,
    popup: {
        install: function (Vue) {
            Vue.component('simpleMap-popup', popup)
        }
    },
    BaseEntity: BaseEntity,
    BasicDataSource: _BasicDataSource,
    PlatformDataSource,
    ElementDataSource,
    MeasureDataSource,
    Events,
    QueryTask,
    ViewerCache,
    util: _util,
}



